package com.china08.yxyapi.repository.mg.huixue;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import com.china08.yxyapi.entity.mg.huixue.YxyHuixuePlanKnowTrainQues;

public interface YxyHuixuePlanKnowTrainQuesRepository extends MongoRepository<YxyHuixuePlanKnowTrainQues, String> {

    List<YxyHuixuePlanKnowTrainQues> findDistinctYxyHuixuePlanKnowTrainQuesByStudentIdAndPlanIdAndKnowId(
            String studentId, String planId, String knowId);

    List<YxyHuixuePlanKnowTrainQues> findDistinctYxyHuixuePlanKnowTrainQuesByStudentIdAndPlanIdAndKnowIdAndQuesIdAndPassed(
            String studentId, String planId, String knowId, String questId, Integer passed);

    List<YxyHuixuePlanKnowTrainQues> findDistinctYxyHuixuePlanKnowTrainQuesByStudentIdAndPlanIdAndKnowIdAndQuesId(
            String studentId, String planId, String knowId, String questId);

    List<YxyHuixuePlanKnowTrainQues> findDistinctYxyHuixuePlanKnowTrainQuesByStudentIdAndPlanIdAndKnowIdAndPassed(
            String studentId, String planId, String knowId, int i);

    Page<YxyHuixuePlanKnowTrainQues> findByStudentIdAndPlanIdAndKnowIdAndPassed(String string, String string2,
            String string3, int i, Pageable pageable);

    YxyHuixuePlanKnowTrainQues findOneByStudentIdAndPlanIdAndKnowIdOrderByCreatedDateDesc(String studentId,
            String planId, String knowId);

    List<YxyHuixuePlanKnowTrainQues> findByPlanIdAndPassed(String plandId, Integer passed);

    Integer countByPlanId(String planId);

    Integer countByPlanIdAndPassed(String planId, int i);

    List<YxyHuixuePlanKnowTrainQues> findByPlanIdAndKnowId(String planId, String knowId);

    Integer countByPlanIdAndKnowIdAndPassed(String planId, String knowId, int i);

    YxyHuixuePlanKnowTrainQues findTopByPlanIdAndKnowIdOrderByCreatedDateDesc(String studentId, String id,
            String knowId);
}
